<?php
$tdatacurrencies=array();
	$tdatacurrencies[".NumberOfChars"]=80; 
	$tdatacurrencies[".ShortName"]="currencies";
	$tdatacurrencies[".OwnerID"]="";
	$tdatacurrencies[".OriginalTable"]="currencies";


	
//	field labels
$fieldLabelscurrencies = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscurrencies["English"]=array();
	$fieldToolTipscurrencies["English"]=array();
	$fieldLabelscurrencies["English"]["id"] = "Id";
	$fieldToolTipscurrencies["English"]["id"] = "";
	$fieldLabelscurrencies["English"]["currency_code"] = "Currency Code";
	$fieldToolTipscurrencies["English"]["currency_code"] = "";
	$fieldLabelscurrencies["English"]["currency_name"] = "Currency Name";
	$fieldToolTipscurrencies["English"]["currency_name"] = "";
	$fieldLabelscurrencies["English"]["country_id"] = "Country";
	$fieldToolTipscurrencies["English"]["country_id"] = "";
	if (count($fieldToolTipscurrencies["English"])){
		$tdatacurrencies[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelscurrencies["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipscurrencies["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelscurrencies["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipscurrencies["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelscurrencies["Chinese (Hong Kong S.A.R.)"]["currency_code"] = "Currency Code";
	$fieldToolTipscurrencies["Chinese (Hong Kong S.A.R.)"]["currency_code"] = "";
	$fieldLabelscurrencies["Chinese (Hong Kong S.A.R.)"]["currency_name"] = "Currency Name";
	$fieldToolTipscurrencies["Chinese (Hong Kong S.A.R.)"]["currency_name"] = "";
	$fieldLabelscurrencies["Chinese (Hong Kong S.A.R.)"]["country_id"] = "Country Id";
	$fieldToolTipscurrencies["Chinese (Hong Kong S.A.R.)"]["country_id"] = "";
	if (count($fieldToolTipscurrencies["Chinese (Hong Kong S.A.R.)"])){
		$tdatacurrencies[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelscurrencies["Chinese (Taiwan)"]=array();
	$fieldToolTipscurrencies["Chinese (Taiwan)"]=array();
	$fieldLabelscurrencies["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipscurrencies["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelscurrencies["Chinese (Taiwan)"]["currency_code"] = "Currency Code";
	$fieldToolTipscurrencies["Chinese (Taiwan)"]["currency_code"] = "";
	$fieldLabelscurrencies["Chinese (Taiwan)"]["currency_name"] = "Currency Name";
	$fieldToolTipscurrencies["Chinese (Taiwan)"]["currency_name"] = "";
	$fieldLabelscurrencies["Chinese (Taiwan)"]["country_id"] = "Country Id";
	$fieldToolTipscurrencies["Chinese (Taiwan)"]["country_id"] = "";
	if (count($fieldToolTipscurrencies["Chinese (Taiwan)"])){
		$tdatacurrencies[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelscurrencies["French"]=array();
	$fieldToolTipscurrencies["French"]=array();
	$fieldLabelscurrencies["French"]["id"] = "Id";
	$fieldToolTipscurrencies["French"]["id"] = "";
	$fieldLabelscurrencies["French"]["currency_code"] = "Currency Code";
	$fieldToolTipscurrencies["French"]["currency_code"] = "";
	$fieldLabelscurrencies["French"]["currency_name"] = "Currency Name";
	$fieldToolTipscurrencies["French"]["currency_name"] = "";
	$fieldLabelscurrencies["French"]["country_id"] = "Country Id";
	$fieldToolTipscurrencies["French"]["country_id"] = "";
	if (count($fieldToolTipscurrencies["French"])){
		$tdatacurrencies[".isUseToolTips"]=true;
	}
}


	
	$tdatacurrencies[".NCSearch"]=true;

	

$tdatacurrencies[".shortTableName"] = "currencies";
$tdatacurrencies[".nSecOptions"] = 0;
$tdatacurrencies[".recsPerRowList"] = 1;	
$tdatacurrencies[".tableGroupBy"] = "0";
$tdatacurrencies[".mainTableOwnerID"] = "";
$tdatacurrencies[".moveNext"] = 1;




$tdatacurrencies[".showAddInPopup"] = false;

$tdatacurrencies[".showEditInPopup"] = false;

$tdatacurrencies[".showViewInPopup"] = false;


$tdatacurrencies[".fieldsForRegister"] = array();

$tdatacurrencies[".listAjax"] = true;

	$tdatacurrencies[".audit"] = false;

	$tdatacurrencies[".locking"] = false;
	
$tdatacurrencies[".listIcons"] = true;
$tdatacurrencies[".edit"] = true;
$tdatacurrencies[".inlineEdit"] = true;
$tdatacurrencies[".view"] = true;

$tdatacurrencies[".exportTo"] = true;

$tdatacurrencies[".printFriendly"] = true;

$tdatacurrencies[".delete"] = true;

$tdatacurrencies[".showSimpleSearchOptions"] = true;

$tdatacurrencies[".showSearchPanel"] = true;


$tdatacurrencies[".isUseAjaxSuggest"] = true;

$tdatacurrencies[".rowHighlite"] = true;


// button handlers file names

$tdatacurrencies[".addPageEvents"] = false;

$tdatacurrencies[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatacurrencies[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatacurrencies[".isUseTimeForSearch"] = false;

$tdatacurrencies[".isUseiBox"] = false;


$tdatacurrencies[".useDetailsPreview"] = true;	

$tdatacurrencies[".isUseInlineAdd"] = true;

$tdatacurrencies[".isUseInlineEdit"] = true;
$tdatacurrencies[".isUseInlineJs"] = $tdatacurrencies[".isUseInlineAdd"] || $tdatacurrencies[".isUseInlineEdit"];

$tdatacurrencies[".allSearchFields"] = array();

$tdatacurrencies[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacurrencies[".allSearchFields"]))
{
	$tdatacurrencies[".allSearchFields"][] = "id";	
}
$tdatacurrencies[".globSearchFields"][] = "currency_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("currency_code", $tdatacurrencies[".allSearchFields"]))
{
	$tdatacurrencies[".allSearchFields"][] = "currency_code";	
}
$tdatacurrencies[".globSearchFields"][] = "currency_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("currency_name", $tdatacurrencies[".allSearchFields"]))
{
	$tdatacurrencies[".allSearchFields"][] = "currency_name";	
}
$tdatacurrencies[".globSearchFields"][] = "country_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("country_id", $tdatacurrencies[".allSearchFields"]))
{
	$tdatacurrencies[".allSearchFields"][] = "country_id";	
}


$tdatacurrencies[".googleLikeFields"][] = "id";
$tdatacurrencies[".googleLikeFields"][] = "currency_code";
$tdatacurrencies[".googleLikeFields"][] = "currency_name";
$tdatacurrencies[".googleLikeFields"][] = "country_id";



$tdatacurrencies[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacurrencies[".allSearchFields"])) 
{
	$tdatacurrencies[".allSearchFields"][] = "id";	
}
$tdatacurrencies[".advSearchFields"][] = "currency_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("currency_code", $tdatacurrencies[".allSearchFields"])) 
{
	$tdatacurrencies[".allSearchFields"][] = "currency_code";	
}
$tdatacurrencies[".advSearchFields"][] = "currency_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("currency_name", $tdatacurrencies[".allSearchFields"])) 
{
	$tdatacurrencies[".allSearchFields"][] = "currency_name";	
}
$tdatacurrencies[".advSearchFields"][] = "country_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("country_id", $tdatacurrencies[".allSearchFields"])) 
{
	$tdatacurrencies[".allSearchFields"][] = "country_id";	
}

$tdatacurrencies[".isTableType"] = "list";


	

$tdatacurrencies[".isDisplayLoading"] = true;

$tdatacurrencies[".isResizeColumns"] = false;

	$tdatacurrencies[".subQueriesSupAccess"] = true;




$tdatacurrencies[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatacurrencies[".strOrderBy"] = $gstrOrderBy;
	
$tdatacurrencies[".orderindexes"] = array();

$tdatacurrencies[".sqlHead"] = "SELECT id,   currency_code,   currency_name,   country_id";
$tdatacurrencies[".sqlFrom"] = "FROM currencies";
$tdatacurrencies[".sqlWhereExpr"] = "";
$tdatacurrencies[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatacurrencies[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatacurrencies[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatacurrencies[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "currencies";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacurrencies["id"]=$fdata;
//	currency_code
	$fdata = array();
	$fdata["strName"] = "currency_code";
	$fdata["ownerTable"] = "currencies";
		$fdata["Label"]="Currency Code"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "currency_code";
	
		$fdata["FullName"]= "currency_code";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacurrencies["currency_code"]=$fdata;
//	currency_name
	$fdata = array();
	$fdata["strName"] = "currency_name";
	$fdata["ownerTable"] = "currencies";
		$fdata["Label"]="Currency Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "currency_name";
	
		$fdata["FullName"]= "currency_name";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacurrencies["currency_name"]=$fdata;
//	country_id
	$fdata = array();
	$fdata["strName"] = "country_id";
	$fdata["ownerTable"] = "currencies";
		$fdata["Label"]="Country"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="country_name";
				$fdata["LookupTable"]="countries";
	$fdata["LookupOrderBy"]="country_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "country_id";
	
		$fdata["FullName"]= "country_id";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacurrencies["country_id"]=$fdata;

	
$tables_data["currencies"]=&$tdatacurrencies;
$field_labels["currencies"] = &$fieldLabelscurrencies;
$fieldToolTips["currencies"] = &$fieldToolTipscurrencies;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["currencies"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="brc_items";
	$detailsTablesData["currencies"][$dIndex] = array(
		  "dDataSourceTable"=>"brc_items"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"brc_items"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT id,   brc_id,   invoice_no,   invoice_date,   custom_no,   custom_date,   description,   blrawb_no,   blrawb_date,   country_id,   bill_amount,   currency_id,   freight_amount,   insurance_amount,   freely_convertable,   fob,   realisation_date,   sdf_form_no,   remarks"	
		, "sqlFrom"=>"FROM brc_items"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$detailsTablesData["currencies"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["currencies"][$dIndex]["detailKeys"][]="currency_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["currencies"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="countries";
	$masterTablesData["currencies"][$mIndex] = array(
		  "mDataSourceTable"=>"countries"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "countries"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$masterTablesData["currencies"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["currencies"][$mIndex]["detailKeys"][]="country_id";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto610=array();
$proto610["m_strHead"] = "SELECT";
$proto610["m_strFieldList"] = "id,   currency_code,   currency_name,   country_id";
$proto610["m_strFrom"] = "FROM currencies";
$proto610["m_strWhere"] = "";
$proto610["m_strOrderBy"] = "";
$proto610["m_strTail"] = "";
$proto611=array();
$proto611["m_sql"] = "";
$proto611["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto611["m_column"]=$obj;
$proto611["m_contained"] = array();
$proto611["m_strCase"] = "";
$proto611["m_havingmode"] = "0";
$proto611["m_inBrackets"] = "0";
$proto611["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto611);

$proto610["m_where"] = $obj;
$proto613=array();
$proto613["m_sql"] = "";
$proto613["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto613["m_column"]=$obj;
$proto613["m_contained"] = array();
$proto613["m_strCase"] = "";
$proto613["m_havingmode"] = "0";
$proto613["m_inBrackets"] = "0";
$proto613["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto613);

$proto610["m_having"] = $obj;
$proto610["m_fieldlist"] = array();
						$proto615=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "currencies"
));

$proto615["m_expr"]=$obj;
$proto615["m_alias"] = "";
$obj = new SQLFieldListItem($proto615);

$proto610["m_fieldlist"][]=$obj;
						$proto617=array();
			$obj = new SQLField(array(
	"m_strName" => "currency_code",
	"m_strTable" => "currencies"
));

$proto617["m_expr"]=$obj;
$proto617["m_alias"] = "";
$obj = new SQLFieldListItem($proto617);

$proto610["m_fieldlist"][]=$obj;
						$proto619=array();
			$obj = new SQLField(array(
	"m_strName" => "currency_name",
	"m_strTable" => "currencies"
));

$proto619["m_expr"]=$obj;
$proto619["m_alias"] = "";
$obj = new SQLFieldListItem($proto619);

$proto610["m_fieldlist"][]=$obj;
						$proto621=array();
			$obj = new SQLField(array(
	"m_strName" => "country_id",
	"m_strTable" => "currencies"
));

$proto621["m_expr"]=$obj;
$proto621["m_alias"] = "";
$obj = new SQLFieldListItem($proto621);

$proto610["m_fieldlist"][]=$obj;
$proto610["m_fromlist"] = array();
												$proto623=array();
$proto623["m_link"] = "SQLL_MAIN";
			$proto624=array();
$proto624["m_strName"] = "currencies";
$proto624["m_columns"] = array();
$proto624["m_columns"][] = "id";
$proto624["m_columns"][] = "currency_code";
$proto624["m_columns"][] = "currency_name";
$proto624["m_columns"][] = "country_id";
$obj = new SQLTable($proto624);

$proto623["m_table"] = $obj;
$proto623["m_alias"] = "";
$proto625=array();
$proto625["m_sql"] = "";
$proto625["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto625["m_column"]=$obj;
$proto625["m_contained"] = array();
$proto625["m_strCase"] = "";
$proto625["m_havingmode"] = "0";
$proto625["m_inBrackets"] = "0";
$proto625["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto625);

$proto623["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto623);

$proto610["m_fromlist"][]=$obj;
$proto610["m_groupby"] = array();
$proto610["m_orderby"] = array();
$obj = new SQLQuery($proto610);

$queryData_currencies = $obj;
$tdatacurrencies[".sqlquery"] = $queryData_currencies;

$tableEvents["currencies"] = new eventsBase;

?>
